package com.example.create_excel;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

@Mapper
@Repository("logMapper")
public interface DataMapper {
    @Select("select t.front_time UpdateTime,"+
                "t.not_update_time NotUpdateDay,"+
                "t.zwxx_count SumDataNumber,"+
                "t.month_count MonthlyDataNumber,"+
                "t1.name DirName,"+
                "t2.name CompanyName "+
            "from ptgl.log_kettle_run t " +
            "left join ptgl.ZJW_ZYBM_CATALOG t1 on t1.code = t.cid " +
            "left join ptgl.zyml_unit t2 on t1.PROVIDERUNIT = t2.code " +
            "where 1=1 " +
            "and t2.superior in ('AH0000','AH0200') " +
            "order by t2.name")
    List<Map<String, String>> getData_ywlj();

    @Select("select t.front_time UpdateTime,"+
                "t.not_update_time NotUpdateDay,"+
                "t.zwxx_count SumDataNumber,"+
                "t.month_count MonthlyDataNumber,"+
                "t1.name DirName,"+
                "t2.name CompanyName "+
            "from ptgl.log_kettle_run t " +
            "left join ptgl.ZJW_ZYBM_CATALOG t1 on t1.code = t.cid " +
            "left join ptgl.zyml_unit t2 on t1.PROVIDERUNIT = t2.code " +
            "where 1=1 " +
            "and t2.superior in ('AH0100') " +
            "order by t2.name")
    List<Map<String, String>> getData_fgj();
}
